<?php
/* 
 * class.index.php
 * 我的家园首页
 * @author samuel
 * @date 2009-05-22
 */
include_once 'class.myhomeBase.php';
class myhome_index extends myhomeBase {

    function  __construct($core) {
        parent::__construct();
        //参数处理
        $this->step = $this->params['step'] ? strtolower(trim($core->params['step'])) : 'index';
	    $this->user_id = $this->params['uid'] ? (int)$this->params['uid'] : 1;
	    $this->type = $this->params['type'] ? strtolower(trim($core->params['type'])) : 'all';
	    if(!$this->user_id){
		    $this->error = "用户ID不合法！";
		    $this->jumpError();
		    exit;
	    }

        $run = "run_" . $this->step;
        
        //header("Content-type: text/vnd.wap.wml");
        $this->$run();
    }

    function run_index(){
    	//WAP页面
	//header("Content-type: text/vnd.wap.wml");
	//TITLE
	$page_title = "我的家园-信息动态";
	$content = "";
	$content .= "<img src='' alt='头像' /><br/>";
	$content .= "<a href='".$_SERVER['PHP_SELF']."?uid=".$this->user_id."'>动态</a>｜<a href='".$_SERVER['PHP_SELF']."?act=userinfo&amp;uid=".$this->user_id."'>信息</a>｜<a href='".$_SERVER['PHP_SELF']."?act=userset&amp;uid=".$this->user_id."'>设置</a><br/>";
	$content .= "<a href='".$_SERVER['PHP_SELF']."?act=msg&amp;uid=".$this->user_id."'>消息</a>｜<a href='".$_SERVER['PHP_SELF']."?act=favor&amp;uid=".$this->user_id."'>收藏</a>｜<a href='".$_SERVER['PHP_SELF']."?act=friend&amp;uid=".$this->user_id."'>好友</a><br/>";
	$content .= "<a href='".$_SERVER['PHP_SELF']."?act=pubSeller&amp;uid=".$this->user_id."'>发布商家</a>｜<a href='".$_SERVER['PHP_SELF']."?act=pubDiscount&amp;uid=".$this->user_id."'>发布优惠</a><br/>";
	$content .= "<a href='".$_SERVER['PHP_SELF']."?type=discount&amp;uid=".$this->user_id."'>优惠</a>｜<a href='".$_SERVER['PHP_SELF']."?type=dynamic&amp;uid=".$this->user_id."'>好友动态</a><br/>";

	//收藏商家优惠信息
	$favorites = $this->getUserFavorites($this->user_id);
	//var_dump($favorites);
	//好友行为
	
	//关注人的碎碎念
	
	
	
	$content .= "<br/><br/>";
	$content .= "<a href='' alt='建议帮助'>建议帮助</a>";



	$this->core->tpl->assign('content', $content);
	$this->core->tpl->assign('page_title', $page_title);
	$this->core->tpl->display('comm.wml');
    
    }
}


?>
